<div class="container">
	<h1 style="font-size: 24px; margin: 0 auto; width: 100px;" class="">员工信息</h1>
	<div class="header">
		<div>
			<#--<div>
				<a href="useredit">
					<button id='plus' class='btn btn-success btn-sm'>添加</button>
				</a>
			</div>-->
			<div>
				<form action="gzimp" enctype="multipart/form-data" method="post">
					<div class="form-group">
						<div id='upload'>
							<label for="exampleFormControlFile1">上传文件:</label>
							<input type="file" class="form-control-file form-control-sm"
								   id="exampleFormControlFile1" style="text-align: center;">
						</div>
						<button class='btn btn-success btn-sm' style="margin-top: 5px;">提交excel文件</button>
					</div>
				</form>
			</div>
		</div>
		<div id='search'>

			<div style="width: 290px;">
				<#--<form class="form-inline my-2 my-lg-0">-->
					<input style="display: inline-block;width: 200px;margin-right: .5rem!important;vertical-align: middle" class="form-control mr-sm-2 form-control-sm usersearch " type="search" placeholder="输入相关信息"
						   aria-label="Search">
					<button style="display: inline-block" class="btn btn-outline-success my-2 my-sm-0 btn-sm usersearchgo1" type="submit">查询</button>
				<#--</form>-->
			</div>
			<div>
				<button type="button" style="margin-bottom: 5px;" class="btn btn-sm btn-success" data-toggle="modal"
						data-target="#exampleModalCenter">
					修改密码
				</button>
			</div>
		</div>
	</div>
	<div class="table-responsive">
		<table class="table table-hover" id='table'>
			<thead>
			<tr>
				<th scope="col">工号</th>
				<th scope="col">姓名</th>
				<th scope="col">派遣公司</th>
				<th scope="col">发薪年月</th>
				<th scope="col">总时数</th>
				<th scope="col">天数</th>
				<th scope="col">白班时薪</th>
				<th scope="col">白班时数</th>
				<th scope="col">夜班时薪</th>
				<th scope="col">夜班时数</th>
				<th scope="col">工资</th>
				<th scope="col">满勤</th>
				<th scope="col">其他</th>
				<th scope="col">应发金额</th>
				<th scope="col">个税</th>
				<th scope="col">实付金额</th>
				<#--<th scope="col">操作</th>-->
			</tr>
			</thead>
			<tbody>
			<#list wages as user>
			<tr>
				<th scope="row">${(user.gh)!''}</th>
				<td>${(user.xm)!''}</td>
				<td>${(user.pqgs)!''}</td>
				<td>${(user.fxny)!''}</td>
				<td>${(user.zss)!''}</td>
				<td>${(user.ts)!''}</td>
				<td>${(user.btsx)!''}</td>
				<td>${(user.bbss)!''}</td>
				<td>${(user.ybsx)!''}</td>
				<td>${(user.ybss)!''}</td>
				<td>${(user.gz)!''}</td>
				<td>${(user.mq)!''}</td>
				<td>${(user.qt)!''}</td>
				<td>${(user.yfje)!''}</td>
				<td>${(user.gs)!''}</td>
				<td>${(user.sfje)!''}</td>
				<#--<td>
					<a href="gongziedit?id=${user.id}"><button type="button" class="btn btn-light btn-sm">修改</button></a>
					<a onclick="{return confirm('删除该记录将不能恢复，确定删除吗？');};" href="gongziedelete?id=${user.id}"><button type="button" class="btn btn-light btn-sm">删除</button></a>
				</td>-->
			</tr>
			</#list>
			</tbody>
		</table>

	</div>
	<nav aria-label="Page navigation example" >
		<ul class="pagination justify-content-end" style="margin-top: 10px;">
			<li class="page-item">
				<a class="page-link" href="#" aria-label="Previous">
					<span aria-hidden="true">&laquo;</span>
				</a>
			</li>
			<li class="page-item"><a class="page-link" href="#">1</a></li>
			<li class="page-item"><a class="page-link" href="#">2</a></li>
			<li class="page-item"><a class="page-link" href="#">3</a></li>
			<li class="page-item">
				<a class="page-link" href="#" aria-label="Next">
					<span aria-hidden="true">&raquo;</span>
				</a>
			</li>
		</ul>
	</nav>
</div>
<!-- Modal -->
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog"
	 aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
	<div class="modal-dialog modal-dialog-centered" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title" id="exampleModalCenterTitle">修改密码</h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body">
				<#--<form class="form-inline">-->
					<div class="alert alert-danger hidden" id="hidden" role="alert">
						密码输入不一致
					</div>
					<div class="form-group col-sm-12 row">
						<label for="inputPassword6" class='col-sm-3 col-form-label'>新密码:</label>
						<input type="password" id="inputPassword"
							   class="col-sm-7 form-control form-control-sm mx-sm-3"
							   aria-describedby="passwordHelpInline">
					</div>
					<div class="form-group col-sm-12 row">
						<label for="inputPassword6" class='col-sm-3 col-form-label'>再次确认:</label>
						<input type="password" id="inputPasswordAgain"
							   class="col-sm-7 form-control form-control-sm mx-sm-3"
							   aria-describedby="passwordHelpInline">
					</div>
				<#--</form>-->
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
				<button type="button" id="save" class="btn btn-success btn-sm">保存</button>
			</div>
		</div>
	</div>
</div>

<script>
	$(function () {
		$('#save').on('click', function() {

			if($('#inputPassword').val() === $('#inputPasswordAgain').val()) {
				$('#hidden').addClass('hidden');

				$.post("changepassword",{password:$('#inputPassword').val()},function(){
					$("#exampleModalCenter").modal('hide');
				});
			}else {
				$('#hidden').removeClass('hidden');
				return;
			}
		})
	})
</script>